Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-stdin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-stdin

Get stdin as a string or buffer

  • 7.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15M
decreased by-11.34%
Maintainers
1
Weekly downloads
 
Created

What is get-stdin?

The get-stdin package is a simple utility that allows you to easily read stdin as a string or buffer in Node.js. It's useful for command-line tools that need to process input piped to them from the command line.

What are get-stdin's main functionalities?

Read stdin as a string

This feature allows you to read the standard input (stdin) as a string. It returns a promise that resolves with the entire input when the stdin stream ends.

const getStdin = require('get-stdin');

getStdin().then(input => {
  console.log(input);
});

Read stdin as a buffer

This feature allows you to read the standard input (stdin) as a buffer. It returns a promise that resolves with the entire input as a buffer when the stdin stream ends.

const getStdin = require('get-stdin');

getStdin.buffer().then(input => {
  console.log(input);
});

Other packages similar to get-stdin

Keywords

FAQs

Package last updated on 15 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc